<template>
  <div class="demo">children--{{userdata.username }}</div>
</template>

<script>
import { reactive, toRefs,inject } from "vue";

export default {
  name: "demo",
  components: {},
  setup(props) {
    const state = reactive({
      userdata:null
    });
    console.log(inject("userdata"));
    state.userdata = inject("userdata")
    return {
      ...toRefs(state),
    };
  },
};
</script>

<style lang='scss' scoped>
</style>
